/**
 * 文件名：BdEventRepoImpl.java
 * 版权：Copyright Lightkit All Rights Reserved.
 * 描述：
 */
package com.lightkits.wms.domain.arrivalnotice.repo.impl;

import com.lightkits.common.db.entity.event.BdEvent;
import com.lightkits.wms.domain.arrivalnotice.repo.BdEventDBService;
import com.lightkits.wms.domain.arrivalnotice.repo.BdEventRepo;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * @author jie.ao@hand-china.com
 * @create 2019-07-11 14:13
 * @desc
 **/
@Repository
public class BdEventRepoImpl implements BdEventRepo {
    private final BdEventDBService service;
    public BdEventRepoImpl(BdEventDBService service) {
        this.service = service;
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void updateBatch(List<BdEvent> modifyList) {
        service.updateAllColumnBatchById(modifyList);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void update(BdEvent bdEvent) {
        service.updateAllColumnById(bdEvent);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void insert(BdEvent bdEvent) {
        service.insert(bdEvent);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void insertBatch(List<BdEvent> insertList) {
        service.insertBatch(insertList);
    }
}
